<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增供应商信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-supplier-add">

            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">供应商编码：</label>
                <div class="col-sm-8">
                    <input name="supplierNo" class="form-control" type="text" required>
                </div>
            </div>
            <!--<div class="form-group">    -->
                <!--<label class="col-sm-3 control-label">供应商组编码：</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<input name="supplierGroupNo" class="form-control" type="text">-->
                <!--</div>-->
            <!--</div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">供应商名称：</label>
                <div class="col-sm-8">
                    <input name="supplierName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">简称：</label>
                <div class="col-sm-8">
                    <input name="simpleName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">是否可用：</label>
                <div class="col-sm-8">
                    <select name="useable" class="form-control" th:with="type=${@dict.getType('useable')}" required>
                        <option value="">请选择</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "bas/supplier"
        $("#form-supplier-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-supplier-add').serialize());
            }
        }
    </script>
</body>
</html>